Skip to content

fix: include quote slippage value in MixPanel event properties - #9786

Open
micaelae wants to merge 5 commits into
mainfrom
swaps4446-fix-post-submit-slippage
Open

fix: include quote slippage value in MixPanel event properties#9786
micaelae wants to merge 5 commits into
mainfrom
swaps4446-fix-post-submit-slippage

Conversation

@micaelae

@micaelae micaelae commented Aug 4, 2026

Copy link
Copy Markdown
Member

Explanation

Saves the QuoteResponse["quote"]["slippage"] value in the txHistory to populate the Submitted, Failed and Completed MixPanel events

References

Fixes https://consensyssoftware.atlassian.net/browse/SWAPS-4446

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've communicated my changes to consumers by updating changelogs for packages I've changed
  • I've introduced breaking changes in this PR and have prepared draft pull requests for clients and consumer packages to resolve them

Note

Low Risk
Single-field analytics fix on history creation with a safe ?? 0 fallback; no submission or transaction logic changes.

Overview
Bridge transaction history no longer hardcodes slippage to 0 when a quote is submitted. On the AddHistoryItem submit step, slippagePercentage is set from quoteResponse.quote.slippage, falling back to 0 when missing.

That value is persisted on the history item so post-submission Unified SwapBridge MixPanel events (Submitted, Failed, Completed) can report the actual slippage limit instead of always sending zero.

Tests and snapshots were updated to expect slippage: 0.01 on the mock quote and matching slippagePercentage on the stored history item.

Reviewed by Cursor Bugbot for commit 75280ce. Bugbot is set up for automated code reviews on this repo. Configure here.

@micaelae
micaelae marked this pull request as ready for review August 4, 2026 23:44
@micaelae
micaelae requested review from a team as code owners August 4, 2026 23:44
@micaelae
micaelae enabled auto-merge August 4, 2026 23:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant